# -*- coding: utf-8 -*-

from os import listdir
import cv2


filepath = "images"
fileList=listdir(filepath)

print(fileList)

#import glob
#for filename in glob.glob(r"E:\\Materials\*jpg"):
    #print filename

i = 0
winName = ""
for filename in fileList:
  print(filename)
  if filename[-3:]=='jpg' or filename[-3:]=='png' or filename[-3:]=='bmp':
    i=i+1
    filename = "images/" + filename
    img = cv2.imread(filename)
    if(img is not None):
      winName = "Num"+str(i)
      cv2.imshow(winName, img)
      cv2.waitKey(10)

cv2.waitKey(0)
cv2.destroyAllWindows()

      

 

      
